package com.tony.mulitithread.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tony.mulitithread.domain.FileInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.ss.formula.functions.T;
import java.util.List;

@Mapper
public interface FileMapper extends BaseMapper<FileInfo> {

    List<FileInfo> queryList(@Param("start") Integer start, @Param("num") Integer num);

    int insertBatch(FileInfo item);

    /**
     * 泛型查询
     *
     * @param
     * @return
     */
    public List<T> selectTableData(@Param("page") Integer page,
                                   @Param("limit") Integer limit);

    int countNum();

    /**
     * 注解多线程泛型查询
     *
     * @param
     * @return
     */
    public List<T> selectTableDataAsync(@Param("page") Integer page,
                                        @Param("limit") Integer limit);
}
